import request from "../utils/request";

export function blogDetail(id) {
    return request({
        url: `/blog/${id}`,
        method: 'get'
    })
}

export function blogList(data) {
    return request({
        url: `/blog/list/brief`,
        method: 'post',
        data: data
    })
}

export function blogPopular() {
    return request({
        url: `/blog/popular`,
        method: `get`
    })
}

export function publishBlog(blog) {
    return request({
        url: `/blog/publish`,
        method: 'post',
        data: blog
    })
}


export function deleteBlogById(id) {
    return request({
        url: `/blog/del/${id}`,
        method: 'get'
    })
}
